package vn.edu.saigontech.ncms.model.bookstore;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.OptimisticLockType;

import vn.edu.saigontech.ncms.model.BaseEntity;

@Entity
@org.hibernate.annotations.Entity(dynamicInsert = true, dynamicUpdate = true, optimisticLock = OptimisticLockType.ALL)
@Table(name = "ncms_bookstore_import_detail")
@SuppressWarnings("serial")
public class ImportReceiptDetail extends BaseEntity {
	
	@ManyToOne
	@JoinColumn(name = "item_id")
	private Item item;

	@Column(name = "quantity")
	private int quantity;

	@ManyToOne
	@JoinColumn(name = "import_id")
	private ImportReceipt importReceipt;

	@JoinColumn(name = "comment")
	private String comment;

	public Item getItem() {
		return item;
	}

	public void setItem(Item item) {
		this.item = item;
	}

	public int getQuantity() {
		return quantity;
	}

	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}

	public ImportReceipt getImportReceipt() {
		return importReceipt;
	}

	public void setImportReceipt(ImportReceipt importReceipt) {
		this.importReceipt = importReceipt;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}
}